﻿namespace NerdWare.Crm2011VsTools.CrmScriptInjector.EventArgs
{
    using System;
    using System.Runtime.CompilerServices;

    public enum MessageType
    {
        Verbose = 0,
        Debug = 1,
        Info = 2,
        Warn = 3,
        Error = 4,
        Fatal = 5
    }

    public sealed class MessageRaisedEventArgs : EventArgs
    {
        public readonly MessageType MessageType;

        public readonly string Message;

        public MessageRaisedEventArgs(MessageType messageType, string message)
        {
            this.MessageType = messageType;
            this.Message = message;
        }

        public MessageRaisedEventArgs(MessageType messageType, string message, params object[] args)
            : this(messageType, string.Format(message, args)) { }
    }
}
